package com.yangbwe.leetcode.learn;

import lombok.extern.slf4j.Slf4j;

import javax.sound.midi.Soundbank;

@Slf4j
public class ojld {
    public static int cisu=0;

    public  static int ojldsuanfa(int a,int b){
        if(b==0) return a;
        cisu=1+cisu;
        System.out.println("这是第"+cisu+"次,第一个数是"+a+"第二个数是"+b+"");
        int c=a%b;
        return ojldsuanfa(b,c);


    }

    public static void main(String[] args) {
        ojld dd=new ojld();
        int a=1071;
        int b=462;
        int ojldsuanfa = dd.ojldsuanfa(a, b);
        System.out.println(a+"和"+b+"的最大公约数是"+ojldsuanfa);
    }


}
